home *** CD-ROM | disk | FTP | other *** search
- MSDOS 2.10 Interrupt Structure
-
- Some of this information is based on data contained in the INTR?.TXT series
- of files maintained in DL 9 of the IBM PROFESSIONAL SIG (PCS-131, IBMSIG).
- Among the contributors to the INTR? series are:
- Janet Jack J. Weaver Jr. John Cooper
- Skip Gilbrech Bob Jack Jim Kyle
-
- -----------------------------------------------------------------------------
- INT 0 - DIVIDE ERROR (8086/88 Chip Feature)
- This interrupt is automatically called at the end of any DIV or IDIV
- operation that results in error. Normally set by DOS to display an error
- message and abort the program.
- -----------------------------------------------------------------------------
- INT 1 - SINGLE-STEP (8086/88 Chip Feature)
- Generated at end of each machine instruction if TF bit in FLAGS is
- set. This is what makes the T command of DEBUG work for single-stepping. Is
- not generated after MOV to segment register or POP of segment register.
- -----------------------------------------------------------------------------
- INT 2 - NMI (Non Maskable Interrupt) (8086/88 Chip Feature)
- Generated by NMI signal in hardware. This interrupt is not disabled by
- the CLI machine-code command. Used in IBM for memory parity error trapping.
- -----------------------------------------------------------------------------
- INT 3 - 1-BYTE INTERRUPT (8086/88 Chip Feature)
- Generated by opcode 0CCh. Similar to 8080's RST instruction. Generally
- used to set breakpoints for DEBUG.
- -----------------------------------------------------------------------------
- INT 4 - OVERFLOW (8086/88 Chip Feature)
- Generated by INTO instruction if OF flag is set. If flag is not set,
- INTO is effectively a NOP. Used to trap any arithmetic errors when program is
- ready to handle them rather than immediately when they occur.
- -----------------------------------------------------------------------------
- INTERRUPTS 5 thru 1F are all machine specific and may vary from one make of
- machine to another. The descriptions given here are for the IBM PC; known
- variations for other systems are indicated where applicable. Note that the
- Heath-Zenith Z100 produces a "WILD INTERRUPT" error message for ALL of these
- interrupt vectors.
- -----------------------------------------------------------------------------
- INT 5 - Print-Screen Key (IBM PC Specific)
- Automatically called by keyboard scan when print-screen key is
- pressed. Normally executes routine to print the screen, but may call any
- routine that can safely be executed from inside the keyboard scanner.
- -----------------------------------------------------------------------------
- INT 6 - Not used, vectors to IRET. (IBM PC Specific)
- -----------------------------------------------------------------------------
- INT 7 - Not used, vectors to IRET. (IBM PC Specific)
- -----------------------------------------------------------------------------
- INT 8 - Vectored Hardware Line (IBM PC Specific)
- Generated in response to IRQ 0 hardware interrupt line (system timer
- IRQ), if enabled via port 21.
- -----------------------------------------------------------------------------
- INT 9 - Vectored Hardware Line (IBM PC Specific)
- Generated in response to IRQ 1 hardware interrupt line (keyboard IRQ),
- if enabled via port 21.
- -----------------------------------------------------------------------------
- INT 0AH - Vectored Hardware Line (IBM PC Specific)
- Generated in response to IRQ 2 hardware interrupt line (unused IRQ),
- if enabled via port 21.
- -----------------------------------------------------------------------------
- INT 0BH - Vectored Hardware Line (IBM PC Specific)
- Generated in response to IRQ 3 hardware interrupt line (unused IRQ),
- if enabled via port 21.
- -----------------------------------------------------------------------------
- INT 0CH - Vectored Hardware Line (IBM PC Specific)
- Generated in response to IRQ 4 hardware interrupt line (serial port
- IRQ), if enabled via port 21. Normally not used and vector points to IRET.
- -----------------------------------------------------------------------------
- INT 0DH - Vectored Hardware Line (IBM PC Specific)
- Generated in response to IRQ 5 hardware interrupt line (unused IRQ),
- if enabled via port 21.
- -----------------------------------------------------------------------------
- INT 0EH - Vectored Hardware Line (IBM PC Specific)
- Generated in response to IRQ 6 hardware interrupt line (floppy disk
- IRQ), if enabled via port 21.
- -----------------------------------------------------------------------------
- INT 0FH - Vectored Hardware Line (IBM PC Specific)
- Generated in response to IRQ 7 hardware interrupt line (printer IRQ),
- if enabled via port 21. Normally not used and vector points to IRET.
- -----------------------------------------------------------------------------
- INT 10 - VIDEO INTERFACE (IBM PC Specific)
- -----------------------------------------------------------------------------
- INT 11 - EQUIPMENT DETERMINATION (IBM PC Specific)
- -----------------------------------------------------------------------------
- INT 12 - MEMORY SIZE (IBM PC Specific)
- -----------------------------------------------------------------------------
- INT 13 - FLOPPY DISK INTERFACE (IBM PC Specific)
- -----------------------------------------------------------------------------
- INT 14 - SERIAL PORT INTERFACE (IBM PC Specific)
- -----------------------------------------------------------------------------
- INT 15 - CASSETTE SERVICE (IBM PC Specific)
- -----------------------------------------------------------------------------
- INT 16 - KEYBOARD INTERFACE (IBM PC Specific)
- -----------------------------------------------------------------------------
- INT 17 - PRINTER INTERFACE (IBM PC Specific)
- -----------------------------------------------------------------------------
- INT 18 - POINTER TO ROM BASIC ENTRY (IBM PC Specific)
- -----------------------------------------------------------------------------
- INT 19 - UNKNOWN (IBM PC Specific)
- -----------------------------------------------------------------------------
- INT 1A - TIME OF DAY (IBM PC Specific)
- -----------------------------------------------------------------------------
- INT 1B - CTRL-BREAK KEY (IBM PC Specific)
- This interrupt is called when the keyboard scanner of the IBM machines
- detects CTRL and BREAK pressed at the same time. It normally points to a
- simple IRET so that it does nothing, but many programs change it to return a
- CTRL-C scan code and thus invoke INT 23.
- -----------------------------------------------------------------------------
- INT 1C - CLOCK TICK (IBM PC Specific)
- This interrupt is called (in the IBM) at the end of each time-update
- operation by the real-time clock routines. It normally points to an IRET
- unless PRINT.COM has been installed.
- -----------------------------------------------------------------------------
- INT 1D - CRT PARAMETER TABLE (IBM PC Specific)
- -----------------------------------------------------------------------------
- INT 1E - FDC PARAMETER LIST (IBM PC Specific)
- -----------------------------------------------------------------------------
- INT 1F - CHAR SET (IBM PC Specific)
- -----------------------------------------------------------------------------
- INT 20 - PROGRAM TERMINATION (MSDOS generic)
- NOTE: NO PARAMETERS - RETURNS TO DOS
- -----------------------------------------------------------------------------
- INT 21 - DOS INTERFACE (MSDOS generic)
- Reg AH = 0
-
- -----------------------------------------------------------------------------
- INT 22 - TERMINATE ADDRESS (MSDOS generic)
- FAR (DWORD) address of routine to be executed when program "returns to
- DOS". Should NOT ever be called.
- -----------------------------------------------------------------------------
- INT 23 - CONTROL "C" EXIT ADDRESS (MSDOS generic)
- Automatically called from keyboard scanner when CTRL-C or CTRL-BREAK
- is detected. Normally aborts program and returns to DOS, but may be changed.
- -----------------------------------------------------------------------------
- INT 24 - FATAL ERROR ABORT ADDRESS (MSDOS generic)
- Automatically called upon detection of unrecoverable disk error.
- Normally prints "Abort, Retry, or Ignore?" message and takes the reply, but
- may be changed if desired.
- -----------------------------------------------------------------------------
- INT 25 - ABSOLUTE DISK READ (MSDOS generic)
- This routine reads data from the disk without regard to the file
- structure or directory. It begins at a "relative sector", which is simply the
- sector number, starting with 0, on the disk. That is, the first sector on the
- second side of track 0 would be sector 0AH, and the first sector on the first
- side of track 1 would be sector 12H.
- ENTRY CONDITIONS:
- AL = Drive number (0=A, 1=B, etc)
- DS:BX = Disk Transfer Address (buffer)
- CX = Number of sectors to read
- DX = First relative sector to read. 0 reads boot
- sector, 1 reads FAT, etc.
- EXIT:
- If carry set, AL=error code.
- If carry not set, operation successful.
- NOTE: This routine PUSHes the flags onto the stack when it is called, and
- does NOT remove them at exit. Be sure to POP the stack immediately after
- returning, to prevent overflow. All of the registers, not just those listed,
- are changed by the routine.
- -----------------------------------------------------------------------------
- INT 26 - ABSOLUTE DISK WRITE (MSDOS generic)
- All parameters and conditions are the same as for INT 25, except that
- this routine WRITES to the disk rather than READing from it. Note that it
- does NOT update the FAT, directories, etc., and can easily destroy a disk
- unless carefully used.
- -----------------------------------------------------------------------------
- INT 27 - TERMINATE BUT STAY RESIDENT (MSDOS generic)
- REG CS = CURRENT PROGRAM SEGMENT
- REG DX = LAST PROGRAM BYTE + 1
- NOTE: RETURN IS TO DOS
- -----------------------------------------------------------------------------
- INT 28 - Internal routine for MSDOS
- This interrupt is called from inside the "get input
- from keyboard" routine in DOS, if and only if it is safe to use
- INT 21 to access the disk at that time. It is used primarily by
- the PRINT.COM routines, but any number of other routines could
- be chained to it by saving the original vector, and calling it
- with a FAR call (or just JMPing to it) at the end of the new
- routine.
- Until PRINT.COM installs its own routine, this
- interrupt vector simply points to an IRET opcode.
- -----------------------------------------------------------------------------
- INT 29 - Internal routine for MSDOS
- This interrupt is called from the DOS output routines if output is
- going to a device rather than a file, and the device driver's attribute word
- has bit 3 (04H) set to "1". Nothing more is known about it at this time.
- -----------------------------------------------------------------------------
- INT 2E - UNKNOWN
- -----------------------------------------------------------------------------
- INT 30 - UNKNOWN
- -----------------------------------------------------------------------------
- INT 31 - UNKNOWN
- -----------------------------------------------------------------------------